//
//  KoiNetError.swift
//  KoiAccounting
//
//  Created by 纪洪文 on 19.03.25.
//

import Foundation
import Alamofire

enum KoiNetError : Error {
    case businessFailure(String?, Int?)
    case httpFailure(Error)
    case koiError(KoiError)
    
    func netErrorMsg() -> String {
        switch self {
        case .businessFailure(let msg, _):
            return msg ?? ""
        case .httpFailure:
            return "似乎有点问题，请稍后重试"
        case .koiError(let koiError):
            return koiError.message
        }
    }
}
